﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using pLib;

namespace WindowsFormsApplication.MyPassword
{
    public class PasswordController : IPasswordController
    {
        MyDatabase databaseController = new MyDatabase();
        public DataTable GetAllPassword()
        {
            DataSet ds = databaseController.SQLConnect_command("dbo.GetPassword");
            return ds.Tables[0];
        }

        public int SavePassword(string userName,string password,string url,string other)
        {
            return databaseController.SQLConnect_ExecuteNonQuery("dbo.InsertPassword",userName,password,url,other);
        }
    }
}
